package com.idealighter.game.roomcard.games.mustniuniu.dto;

import com.baidu.bjf.remoting.protobuf.FieldType;
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;

import java.util.List;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

public class GameCfgDto {
  @Data
  public static class BasicGameInfoDto {
    @Protobuf(order = 1)
    private List<MustNiuNiuBetOptionDto> betOptions;
    @Protobuf(order = 2)
    private List<MustNiuNiuRoundDto> rounds;
    @Protobuf(order = 3)
    private List<RoomCardMustNiuNiuFeeDto> fees;
    @Protobuf(order = 4)
    private List<MustNiuNiuStartOptionDto> startOptions;
    @Protobuf(order = 5)
    private List<MustNiuNiuSeatDto> seats;
    @Protobuf(order = 6)
    private List<MustNiuNiuExtrBetOptionDto> extrBetOptions;
    @Protobuf(order = 7)
    private List<MustNiuNiuCardMultipleDto> multiples;
    @Protobuf(order = 8)
    private List<MustNiuNiuCardSpecialMultipleDto> specialMultiples;
    @Protobuf(order = 9)
    private List<MustNiuNiuAdvanceOptionDto> advanceOptions;
  }

  public static class FreeCallBankerGameInfoCfgDto extends BasicGameInfoDto {
  }

  public static class NiuNiuBeBankerGameInfoCfgDto extends BasicGameInfoDto {
  }

  @Getter
  @Setter
  public static class OwnerBeBankerGameInfoCfgDto extends BasicGameInfoDto {
    @Protobuf(order = 10)
    private List<MustNiuNiuBankerChipDto> bankerChips;
  }

  @Getter
  @Setter
  public static class ShowCardCallBankerGameInfoCfgDto extends BasicGameInfoDto {
    @Protobuf(order = 10)
    private List<MustNiuNiuCallBankerMultipleDto> callBankerMultiples;
  }

  @Data
  public static class MustNiuNiuBetOptionDto {
    @Protobuf(order = 1)
    private int id;
    @Protobuf(order = 2, fieldType = FieldType.INT32)
    private List<Integer> betChips;
    @Protobuf(order = 3)
    private String name;
  }

  @Data
  public static class MustNiuNiuRoundDto {
    @Protobuf(order = 1)
    public int round;
    @Protobuf(order = 2)
    public String name;
  }

  @Data
  public static class MustNiuNiuStartOptionDto {
    @Protobuf(order = 1)
    public int id;
    @Protobuf(order = 2)
    public int persons;
    @Protobuf(order = 3)
    public String name;
  }

  @Data
  public static class MustNiuNiuSeatDto {
    @Protobuf(order = 1)
    public int seat;
    @Protobuf(order = 2)
    public String name;
  }

  @Data
  public static class MustNiuNiuExtrBetOptionDto {
    @Protobuf(order = 1)
    public int id;
    @Protobuf(order = 2)
    public int multiple;
    @Protobuf(order = 3)
    public String name;
  }

  @Data
  public static class MustNiuNiuCardMultipleDto {
    @Protobuf(order = 1)
    public int id;
    @Protobuf(order = 2)
    public List<MultipleOptionDto> multiples;
    @Protobuf(order = 3)
    public String name;
  }

  @Data
  public static class MultipleOptionDto {
    @Protobuf(order = 1)
    public int niu;
    @Protobuf(order = 2)
    public int multiple;
  }

  @Data
  public static class MustNiuNiuCardSpecialMultipleDto {
    @Protobuf(order = 1)
    public int id;
    @Protobuf(order = 2)
    public int niu;
    @Protobuf(order = 3)
    public int multiple;
    @Protobuf(order = 4)
    public String name;
  }

  @Data
  public static class MustNiuNiuAdvanceOptionDto {
    @Protobuf(order = 1)
    public int id;
    @Protobuf(order = 2)
    public String name;
  }

  @Data
  public static class MustNiuNiuBankerChipDto {
    @Protobuf(order = 1)
    public int id;
    @Protobuf(order = 2)
    public int chips;
    @Protobuf(order = 3)
    public String name;
  }

  @Data
  public static class MustNiuNiuCallBankerMultipleDto {
    @Protobuf(order = 1)
    public int multiple;
    @Protobuf(order = 2)
    public String name;
  }

  @Data
  public static class MustNiuNiuTrusteeBetOptionDto {
    @Protobuf(order = 1)
    public int niu; // 没牛:任意牌，8:牛8以上
    @Protobuf(order = 2)
    public int index; // 下注选项的下标
  }

  @Data
  public static class MustNiuNiuTrusteeExtrBetOptionDto {
    @Protobuf(order = 1)
    public int niu; // -1:不推注,没牛:任意牌推注，8:牛8以上
    @Protobuf(order = 2)
    public String name; // 名称

    public MustNiuNiuTrusteeExtrBetOptionDto() {
      niu = -1;
      this.name = "不推注";
    }
  }

  @Data
  public static class MustNiuNiuTrusteeCallBankerOptionDto {
    @Protobuf(order = 1)
    public int niu; // 0:任意牌
    @Protobuf(order = 2)
    public int multiple; // 抢庄倍数(0:不抢庄，【自由抢庄: niu=0,multiple=1】)
    @Protobuf(order = 3)
    public String name;
  }

  @Data
  public static class RoomCardMustNiuNiuFeeDto {
    // 编号
    @Protobuf(order = 1)
    private int id;
    // 类型(0:牛牛上庄,1:固定庄家,2:自由抢庄,3:明牌抢庄)
    @Protobuf(order = 2)
    private int type;
    // 座位数量
    @Protobuf(order = 3)
    private int seats;
    // 回合数
    @Protobuf(order = 4)
    private int rounds;
    // 当有房主支付时的费用
    @Protobuf(order = 5)
    private long payByOwnerFee;
    // 当AA制时，支付的费用
    @Protobuf(order = 6)
    private long payByAaFee;
  }
}
